<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Batch URL Opener</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 2rem;
        }

        textarea {
            width: 100%;
            height: 150px;
        }

        .btn {
            margin-right: 1rem;
        }
    </style>
</head>

<body>
    <h1>Batch URL Opener</h1>
    <p>Enter URLs below, one per line:</p>
    <textarea id="urlList" placeholder="111">
        https://www.wgj7.com
        https://www.wgj9.com
        https://www.yzdsaas.com
        https://www.yuzhidun.cn
        https://www.zhongkeanqi.com
    </textarea>
    <br>
    <button class="btn btn-success" onclick="openUrls()">Open URLs</button>
    <button class="btn btn-primary" onclick="clearUrls()">Clear</button>
    <input type="number" id="delayInput" value="600" min="100" max="3000">
    <label for="delayInput">Delay (ms)</label>

    <script>
        function clearUrls() {
            document.getElementById('urlList').value = '';
        }

        function openUrls() {
            const delayMs = parseInt(document.getElementById('delayInput').value, 10);
            const urlList = document.getElementById('urlList').value.trim().split('\n');
            urlList.forEach(url => {
                setTimeout(() => {
                    if (url.startsWith('http://') || url.startsWith('https://')) {
                        window.open(url, '_blank');
                    } else {
                        window.open(`http://${url}`, '_blank');
                    }
                }, delayMs);
                delayMs += parseInt(delayMs, 10);
            });
        }
    </script>
</body>

</html>